package com.heima.user.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.heima.common.dtos.ResponseResult;
import com.heima.model.user.dtos.CheckRegisterDto;
import com.heima.model.user.dtos.ApplyToWemediaDto;
import com.heima.model.user.dtos.LoginDto;
import com.heima.model.user.dtos.RegisterDto;
import com.heima.model.user.pojos.ApUser;
import org.springframework.web.multipart.MultipartFile;

import java.util.Map;

/**
 * IService: MyBatisPlus的业务接口，对BaseMapper的二次封装
 *    例如：  BaseMapper  selectById()    deleteById()                      insert()              selectByPage()
 *            IService    getById()       removeById()/removeByIds(list)    save()/saveBatch()    page()
 */
public interface ApUserService extends IService<ApUser> {

    ResponseResult<Map<String, Object>> login(LoginDto dto);

    /**
     * 生成并且返回验证码
     * @param dto
     * @return
     */
    ResponseResult appSendSMS(RegisterDto dto);
    /**
     * 验证码注册校验,注册用户
     */
    ResponseResult appClientRegister(CheckRegisterDto dto);

    ResponseResult apply_to_become_Wemedia(MultipartFile file, ApplyToWemediaDto dto);//
}
